﻿<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="Cwgl_CancelAuditing_Grid.aspx.vb" Inherits="Slxt.Cwgl_CancelAuditing_Grid" %>
<%@ Register TagPrefix="cnt" Namespace="Mysoft.Map.Application.Controls" Assembly="Mysoft.Map.Application.Components" %>
<%@ Register TagPrefix="mnu" Namespace="Mysoft.Map.Application.Menus" Assembly="Mysoft.Map.Application.Components" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
	<HEAD>
		<title></title>
		<meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR">
		<meta content="Visual Basic .NET 7.1" name="CODE_LANGUAGE">
		<meta content="JavaScript" name="vs_defaultClientScript">
		<meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
		<link rel="stylesheet" type="text/css" href="/_grid/map_grid.css">
		<link rel="stylesheet" type="text/css" href="/_nav/menu.css">
		<script language="javascript" src="/_common/scripts/global.js"></script>
		<link rel="stylesheet" type="text/css" href="/_forms/styles/form.css">
		<link rel="stylesheet" type="text/css" href="/_controls/find/find.css">
		<link rel="stylesheet" type="text/css" href="/_common/styles/global.css">
		<script language="javascript" src="/_controls/settings.aspx"></script>
		<script language="javascript" src="/_controls/util/util.js"></script>
		<script language="javascript" src="/_controls/datetime/date.js"></script>
		<script language="javascript" src="/_controls/number/number.js"></script>
		<script language="javascript" src="/_nav/menu.js"></script>
		<script language="javascript" src="/SLXT/JS/Public.js"></script>
		<script language="javascript" src="Cwgl_Public.js"></script>
		<script language="javascript">
		    //新增窗口
			function openAddWin(sSaletype)	
			{
			
			}
			//修改窗口
			function openModiWin()	
			{
			
			}
                        //删除窗口
			function openModiWin()	
			{
			
			}
			//取消当前列表显示的所有单据
			function openCancelAuditing(){
				
				if(window.confirm("确认要取消财务单据列表中显示的所有单据吗？") == false) return;
				var oTr=document.all("appGrid").getAllRows();
			
				if (!oTr) return;
				
				var strVouchGUID="";
				for(var i=0;i<oTr.length;i++)
				{
					strVouchGUID = strVouchGUID + ",'" + oTr[i].oid + "'";
				}
							
				if (Trim(strVouchGUID) == "") return;
				
				strVouchGUID = strVouchGUID.substring(1,strVouchGUID.length);
				
				//取消已生成的凭证
				sReturn = GetDataFromXMLHTTP("/PubProject/Cwjk/Pzgl_XMLHTTP.aspx", "CancelExportPz", "", "", strVouchGUID);
		    
				if (sReturn != "OK")
				{	           
					alert("操作失败，请与管理员联系！");
					return;
				}
				
				var strReturn = "CancelAuditing!!"; 
				//更新审核状态
				ReturnValue = GetDataFromCwglXMLHTTP("CWGL_ShVoucher",strReturn,strVouchGUID);
							
				if(ReturnValue != "") alert(ReturnValue);
				
				parent.window.returnValue="OK";
				
				parent.window.close();
			}
		</script>
	</HEAD>
	<body MS_POSITIONING="GridLayout" style="margin-top:15px;margin-left:15px; margin-right:15px">
		<table style="FONT-SIZE: 9pt" height="100%" cellSpacing="0" cellPadding="0" width="100%">
		<tr height="60">
						<td class="header">
							<div class="header"></div>							
							<span style="PADDING-LEFT:8px">本单据生成的凭证为合并凭证，有以下相关联的单据；</span>
							<br>	<br>						
							<span style="PADDING-LEFT:8px">“取消审核”会将列表中的单据全部取消审核，并删除对应的凭证记录。</span>
						</td>
			</tr>
			<tr>
				<td>
					<table style="FONT-SIZE: 9pt" height="100%" cellSpacing="0" cellPadding="0" width="100%">
						<tr height="1">
							<td>
								<mnu:AppGridMenu id="appGridMenu" runat="server" />
							</td>
						</tr>
						<tr>
							<td>
								<cnt:AppGrid id="appGrid" runat="server" multiselect=false Filter="<filter/>" />
							</td>
						</tr>
					</table>
				</td>
			</tr>
			<tr height="40"  id="trsp">
					<td class="buttons" colSpan="2">
						<button onclick="openCancelAuditing();" id="btnOk" type="button">取消审核</button>&nbsp;&nbsp; <button onclick="parent.window.close();" id="btnCancel" type="button">
							关 闭</button>
					</td>
				</tr>			
		</table>
	</body>
</HTML>
